package com.sykj.jiangpengcheng.utils;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @ClassName ResponseResult
 * @Description TODO
 * Author JiangPengCheng
 * Date 2020/7/15 9:13
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult implements Serializable {
    private Integer code;
    private String  message;
    private Object object;



    public static com.sykj.utils.ResponseResult ok(String message){
        return new com.sykj.utils.ResponseResult(200,message,null);
    }

    public static com.sykj.utils.ResponseResult ok(String message, Object object){
        return new com.sykj.utils.ResponseResult(200,message,object);
    }

    public static com.sykj.utils.ResponseResult error(String message){
        return new com.sykj.utils.ResponseResult(500,message,null);
    }
    public static com.sykj.utils.ResponseResult error(String message, Object o){
        return new com.sykj.utils.ResponseResult(500,message,o);
    }
}
